package com.alibaba.citrus.cr.sales.plan.facade.service.setting;

import com.alibaba.citrus.cr.common.annotation.FacadeInvoker;
import com.alibaba.citrus.cr.sales.plan.api.setting.StrategyFactorQueryService;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.PageQueryStrategyFactorRequest;
import com.alibaba.citrus.cr.sales.plan.repository.StrategyFactorRepository;
import com.alibaba.citrus.cr.sales.plan.sdo.StrategyFactorSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StrategyFactorQueryServiceImpl implements StrategyFactorQueryService {

    @Resource
    private StrategyFactorRepository strategyFactorRepository;

    @FacadeInvoker
    @Override
    public Result<PageResult<List<StrategyFactorSDO>>> pageQueryStrategyFactorList(
        PageQueryStrategyFactorRequest strategyFactorRequest) {
        PageResult<List<StrategyFactorSDO>> listPageResult = strategyFactorRepository.pageQueryStrategyFactorList(strategyFactorRequest);
        return Result.success(listPageResult);
    }
}
